Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jbox2d.dynamics.joints
Class GearJointDef

    java.lang.Object
      org.jbox2d.dynamics.joints.JointDef
          org.jbox2d.dynamics.joints.GearJointDef

    public class GearJointDef

extends JointDef

Gear joint definition. This definition requires two existing revolute or prismatic joints (any combination will work). The provided joints must attach a dynamic body to a static body.
A gear joint is used to connect two joints together. Either joint can be a revolute or prismatic joint. You specify a gear ratio to bind the motions together: coordinate1 + ratio * coordinate2 = constant The ratio can be negative or positive. If one joint is a revolute joint and the other joint is a prismatic joint, then the ratio will have units of length or units of 1/length.
Warning: The revolute and prismatic joints must be attached to fixed bodies (which must be body1 on those joints).

Field Summary
`Joint` | `joint1` The first revolute/prismatic joint attached to the gear joint.
`Joint` | `joint2` The second revolute/prismatic joint attached to the gear joint.
`float` | `ratio` The gear ratio.

Fields inherited from class org.jbox2d.dynamics.joints.JointDef
`body1, body2, collideConnected, type, userData`

Constructor Summary
`GearJointDef()`

Method Summary

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### joint1

    public Joint joint1

  The first revolute/prismatic joint attached to the gear joint.

### joint2

    public Joint joint2

  The second revolute/prismatic joint attached to the gear joint.

### ratio

    public float ratio

  The gear ratio.

  See Also:
    `for explanation.`

Constructor Detail

### GearJointDef

    public GearJointDef()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD